#ifndef _TEST_APP
#define _TEST_APP

#include "ofMain.h"

#include "ofxOpenCv.h"
#include "ofxVectorMath.h"
#include "ofxXmlSettings.h"
#include "quadPointsPanel.h"
#include "ofxOsc.h"
#include "basicParameters.h"
#include "ofxControlPanel.h"
#include "ofxDaito.h"

#define PORT 9000
#define TOTAL_FRAMES 
//#define _USE_LIVE_VIDEO		// uncomment this to use a live camera
								// otherwise, we'll use a movie file


class testApp : public ofBaseApp{

	public:

		void setup();
		void update();
		void draw();
	void readXML();

		void keyPressed  (int key);
		void mouseMoved(int x, int y );
		void mouseDragged(int x, int y, int button);
		void mousePressed(int x, int y, int button);
		void mouseReleased(int x, int y, int button);
		void windowResized(int w, int h);
	void debugy();	
	void incrementCurrentFrame();
	void decrementCurrentFrame();
	void moveCurrentFrame(int _currentW);
	int frameNum;
	int currentFrame;
	int currentMode;
	int maxPanelNum;
	bool bAutoIncrementCurrentFrame;
	ofxControlPanel controlPanel;
	bool bSendOSC;
	bool bDrawPanel;
	ofxXmlSettings XML;
	float lerpVal;
	int calibFrame;
	void saveXML();

	void receiveOSC();
//		quadPointsPanel panel;
	vector<quadPointsPanel>panel;
	int currentPanel;
	
	string xmlStructure;	
	int pointCount;
	int lineCount;
	int lastTagNumber;
	string message;	
	
	
private:
	ofxOscReceiver	receiver;


};

#endif
